#include<iostream>
using namespace std;
int main()
{
	int score[]={1,3,2,4,6,5,8,7,9};
	int max=score[0];
	int min=score[0];
	double ave,sum;
	for(int i=0;i<9;i++)
	{
		sum+=score[i];
		if(score[i]>max)
			max=score[i];
		if(score[i]<min)
			min=score[i];
	}
	ave=(sum-max-min)/7;
	cout<<"average="<<ave<<endl;
}

